/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Playerz.java
 *
 * Created on 2010-feb-04, 17:46:32
 */
package exmtgproj;


/**
 *
 * @author marcus ahlen
 */
public class Player extends javax.swing.JPanel implements Targetable, Statics {
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */

    String name;
    int player;
    int life = 20;
    CardList[] zone = new CardList[ZONES];

    public Player(String name, String file) {
        initComponents();
        this.name = name;
        player = Game.players.size();               ///kanske inte funkar
        for (int i = 0; i < zone.length; i++) {
            zone[i] = new CardList();
        }
        zone[deck] = CardGenerator.getDeck(file);
    }

    public Player(String n, CardList d) {
        name = n;
        for (int i = 0; i < zone.length; i++) {
            zone[i] = new CardList();
        }
        zone[deck] = d;
    }

    Player() {
        name = "test";
        for (int i = 0; i < zone.length; i++) {
            zone[i] = new CardList();
        }
    }

    public Card target(Player[] player, int[] area, int[] type) {
        Card target = target(player, area, type);
        return target;
    }

    public Player getOpponents() {
        return this;
    }

    public boolean pay(byte[] mana){
        byte[] payed = new byte[COLORS];
        while(Ability.costPayed(mana, payed)){

        }
        return true;
    }

    public void gain(int amount) {
    }

    public void dealt(int amount) {
    }

    public void draw(int amount) {
    }

    public void discard(int amount) {
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
